import asyncio
from traceback import print_stack

from tidy_core.combine_config import combine_config
from tidy_core.load_cmd import parse_cmd
from tidy_core.tidy import tidy_up_async
from tidy_core.load_config import Config

if __name__ == '__main__':
    try:
        config_dict = combine_config(Config('./config/base.configure'))
        if config_dict:
            asyncio.run(tidy_up_async(config_dict))
        else:
            raise Exception
    except Exception as e:
        print("error")